package com.situ.day718.Rectangle;

public class Rectangle {
    private int length;
    private int wide;

    public Rectangle() {
        this.length = 1;
        this.wide = 1;
    }

    public Rectangle(int side) {
        this.length = side;
        this.wide = side;
    }

    public Rectangle(int length, int wide) {
        this.length = length;
        this.wide = wide;
    }

    //求周长
    public int perimeter(){
        return (length + wide)*2;
    }

    //求面积
    public int area(){
        return length * wide;
    }
}
